翻訳と辞書
Words near each other
・ God Mazinger
・ God Medicine
・ God Mode
・ God mode
・ God Mode (Person of Interest)
・ God Module
・ God morgon
・ God morgon (Chips song)
・ God morgon (Uno & Irma song)
・ God Moves in a Mysterious Way
・ God Moves on the Water
・ God Must Be a Cowboy
・ God Must Be Busy
・ God Nisanov
・ God Nose
God object
・ God of Abraham
・ God of Bath
・ God of Blades
・ God of Carnage
・ God of Cat Food
・ God of Chaos
・ God of Every Story
・ God of Gamblers
・ God of Gamblers II
・ God of Gamblers Returns
・ God of Israel
・ God of Love
・ God of Love (album)
・ God of Love (film)


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

God object : ウィキペディア英語版
God object

In object-oriented programming, a god object is an object that ''knows too much'' or ''does too much''. The god object is an example of an anti-pattern.
A common programming technique is to separate a large problem into several smaller problems (a divide and conquer strategy) and create solutions for each of them. Once the smaller problems are solved, the big problem as a whole has been solved. Therefore a given object for a small problem need only know about itself. Likewise, there is only one set of problems an object needs to solve: its ''own'' problems.
In contrast, a program that employs a god object does not follow this approach. Most of such a program's overall functionality is coded into a single "all-knowing" object, which maintains most of the information about the entire program, and also provides most of the methods for manipulating this data. Because this object holds so much data and requires so many methods, its role in the program becomes god-like (all-knowing and all-encompassing). Instead of program objects communicating among themselves directly, the other objects within the program rely on the single god object for most of their information and interaction. Since this object is tightly coupled to (referenced by) so much of the other code, maintenance becomes more difficult than it would be in a more evenly divided programming design. Changes made to the object for the benefit of one routine can have unintended effects on other unrelated routines.
A god object is the object-oriented analogue of failing to use subroutines in procedural programming languages, or of using far too many global variables to store state information.
Whereas creating a god object is typically considered bad programming practice, this technique is occasionally used for tight programming environments (such as microcontrollers), where the slight performance increase and centralization of control are more important than maintainability and programming elegance.
== See also ==

* Ravioli code, the opposite pattern

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「God object」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.